<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>mymsgro</title>
	<link rel="stylesheet" type="text/css" href="css/main.css" />
	<link rel="stylesheet" type="text/css" href="css/meniu.css" />
	<link rel="stylesheet" type="text/css" href="css/style.css" />
</h:head>

<h:body>

	<ui:include src="header.xhtml" />

	<h:panelGroup layout="block" id="content">

		<ui:include src="leftMenu.xhtml" />

		<h:panelGroup layout="block" id="contenRight">
<f:event type="preRenderView" listener="#{interviewBean.preRenderView}"/>
			<h:panelGroup layout="block" id="header" style="margin-top: 20px;">
				<ul>
					<li id="selected"><a>Send email to candidate</a></li>
				</ul>
			</h:panelGroup>

			<h:panelGroup layout="block" id="contentTab">


				<h:form id="formular">
					<h:commandButton style="width:50px; height:30px;"
						image="resources/img/back-button.png"
						action="#{interviewBean.goBack}" immediate="true"></h:commandButton>


					<h:panelGrid columns="3">

						<h:outputText value="Candidate FirstName: "
							style="font-weight:bold" />

						<h:outputText value="#{candidateBean.candidateDTO.firstname}" />

						<h:outputText />

						<h:outputText value="Candidate LastName: "
							style="font-weight:bold" />

						<h:outputText value="#{candidateBean.candidateDTO.lastname}" />

						<h:outputText />

						<h:outputText value="Date (yyyy-mm-dd): " style="font-weight:bold" />

						<p:calendar effect="explode"
							value="#{interviewBean.interviewDTO.date}" readonlyInput="true"
							timeZone="#{calendarBean.timeZone}"
							mindate="#{calendarBean.dateNow}" pattern="yyyy-MM-dd"
							id="popupButtonCal" />

						<h:outputText />





						<h:outputText value="Details: " style="font-weight:bold" />
						<h:inputTextarea value="#{interviewBean.interviewDTO.details}"
							cols="20" rows="5" style="width: 92%" />
						<h:outputText />

						<h:outputText value="Interviewer name" style="font-weight:bold" />
						<h:selectOneMenu value="#{interviewBean.selectedEmployeeId}"
							style="width: 96%">

							<f:selectItems value="#{interviewBean.employees}"
								var="currentEmployee" itemValue="#{currentEmployee.id}"
								itemLabel="#{currentEmployee.firstname} #{currentEmployee.lastname}">
							</f:selectItems>
						</h:selectOneMenu>


						<h:outputText value="" />
						<h:inputHidden value="#{candidateBean.candidateDTO.id}" />
						<h:outputText />



						<h:commandButton style="width: 100px;float:left;"
							image="resources/img/sendEmailButton.png"
							action="#{interviewBean.canBean.getCandidateForSendingEmail}">

							<f:param name="id" value="#{candidateBean.candidateDTO.id}" />

						</h:commandButton>



						<h:commandButton value="Save"
							action="#{interviewBean.addInterview}"
							style="cursor: pointer;

                                                        align-content: center;

                                                        align-self: center;

                                                        border-radius: 4px;

                                                        width: 60%;

                                                        float:left">

						</h:commandButton>



						<h:outputText value="#{interviewBean.errorMessage}"
							style="color:red" />




						<h:outputText value="#{interviewBean.errorMessageSend}"
							style="color:red" />

					</h:panelGrid>

				</h:form>
			</h:panelGroup>
		</h:panelGroup>
	</h:panelGroup>

</h:body>

</html>